Skip to content

Comments

Ote#2

Open
Golem24434 wants to merge 7 commits intomainfrom
ote
Open

Ote#2
Golem24434 wants to merge 7 commits intomainfrom
ote

Conversation

@Golem24434
Copy link
Owner

No description provided.

${INC_DIR}/find_letters.h
${SRC_DIR}/find_letters.c)

add_library(multi_compute_matrix MODULE

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше использовать SHARED

#include <sys/mman.h>
#include <sys/wait.h>
#include <time.h>
#include <dlfcn.h>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

много инклюдов в публичном хедере, здесь должны подключаться только необходимые заголовки6 остальные в c файле

: "0" (eax), "2" (ecx)
: );

return eax;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в си для этого есть функции )


int date_in_key(date_frame date) {

int value = (((date.year)*12 + date.month)*30 + date.day);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

12, 30 нужно было обозначит через константы, так как сейчас они магические числа

while (left <= right)
{
int mid = (left + right) / 2;
if (k[mid] == NULL) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

поехало форматирование

for (int i=start;i<=end;++i) {
for (int j=0;j<letters[i]->number_ecipient;++j){
if (letters[i]->ecipient_id[j] == number_user) {
for (int o=0;o<9;++o) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не хвататет пробелов, 9 - надо вынести в контанты

return find_topics;
}

str_topics* multiprocess_find_topic(letter** letters, int start,int end, int number_user) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

реализации должны находится в разных c файлах

} else {
return 0;
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тесты должны быть в отдельном файле, эту функции стоило назвать check или equal

@@ -0,0 +1,80 @@
#include "../include/testy/find_letters.h"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

относительные пути не очень хорошо, это можно решить с помощью cmake


TEST(binary_search, ok) {
letter* let[200];
testing_letters_el(let,200);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

эта функция должна быть в тестах

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants